CC = gcc -std=gnu99 
GPP = g++
GCC_FLAG_LIBS = -Lutil/ -Iutil/
LIBS = util/log4c.o

class : cpp/class.cpp ${LIBS} 
	${GPP} -o ./class.out cpp/class.cpp ${GCC_FLAG_LIBS} ${LIBS}
	
friend : cpp/friend.cpp ${LIBS} 
	${GPP} -o ./friend.out cpp/friend.cpp ${GCC_FLAG_LIBS} ${LIBS}

constructor : cpp/contructor.cpp ${LIBS} 
	${GPP} -o ./contructor.out cpp/contructor.cpp ${GCC_FLAG_LIBS} ${LIBS}

libslist : data_structure/slist.c ${LIBS} 
	${CC} -c -o data_structure/slist.o data_structure/slist.c ${GCC_FLAG_LIBS} 

util/log4c.o : util/log4c.c
	${GPP} -c -o util/log4c.o util/log4c.c

inheritance : cpp/inheritance.cpp
	${GPP} -o ./inheritance.out cpp/inheritance.cpp 

inheritance_public_private_protected : cpp/inheritance_public_private_protected.cpp
	${GPP} -o ./inheritance_public_private_protected.out cpp/inheritance_public_private_protected.cpp 

override_ : cpp/override.cpp
	${GPP} -o ./override.out cpp/override.cpp 

overwrite : cpp/overwrite.cpp
	${GPP} -o ./overwrite.out cpp/overwrite.cpp 

multi_inheritance : cpp/multi_inheritance.cpp
	${GPP} -o ./multi_inheritance.out cpp/multi_inheritance.cpp

virtual : cpp/virtual.cpp
	${GPP} -o ./virtual.out cpp/virtual.cpp

operator : cpp/operator.cpp
	${GPP} -o ./operator.out cpp/operator.cpp

static_fun : cpp/static_fun.cpp
	${GPP} -o ./static_fun.out cpp/static_fun.cpp

templete : cpp/templete.cpp
	${GPP} -o ./templete.out cpp/templete.cpp

stl : cpp/stl.cpp
	${GPP} -o ./stl.out cpp/stl.cpp

SgVector : cpp/MyVector.cpp
	${GPP} -o ./SgVector.out cpp/MyVector.cpp

clean :
	rm -rf ./*.out
	rm -rf data_structure/*.o
	rm -rf cpp/*.o
	rm -rf util/*.o
	

